Skip to content

fix(workspace): show Docker build progress without default timeouts - #1175

Open
crispinhu27 wants to merge 1 commit into
mainfrom
feature/docker-build-progress
Open

crispinhu27 wants to merge 1 commit into
mainfrom
feature/docker-build-progress

Conversation

@crispinhu27

Copy link
Copy Markdown
Collaborator

What changed

  • Show the active Dockerfile step and final build status in the conversation. Progress flows from connected runners and through platform handovers.
  • Let quiet Docker builds continue by default. Operators can configure stall and total limits with the existing Docker build settings.
  • Tie Runner conversation workspace preparation to the conversation request. Stopping the turn or losing the Runner connection cancels preparation.

Scope

  • Platform core / API / runner
  • Shared behavior contract

Compatibility

Ship the platform and connected Runner together so workspace preparation can receive cancellation. Existing explicit Docker build limits still apply.

Validation

  • bash scripts/build-chatbot.sh built the frontend and passed 464 tests.
  • go test -p=2 ./internal/httpapi ./internal/runner ./internal/runtime ./internal/engine -run 'Test(RunnerWorkspace|RunnerConversationWorkspace|ConversationWorkspace|DockerBuild)' -count=1 -timeout=120s and go test ./internal/procwatch -count=1 -timeout=120s passed in local Docker.
  • python3 scripts/check-public.py and git diff --check passed.
  • Before syncing with current main, a cold workspace image built through a local connected Runner with a cached Node base image and a deterministic test CLI. One Dockerfile step downloaded a 61.5 MiB Go SDK at about 64 KiB/s for 16m 20s. The conversation still showed that step at 10m 10s and 15m 10s. BuildKit exported the image after 16m 35s. The resulting workspace ran go version and executed the compiled test program.

Safety

  • Reviewed the public diff for credentials, internal endpoints, production data, and organization-specific infrastructure.
  • Scoped the commit to workspace build progress and cancellation.

@Robert0622 Robert0622 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 8db9ac23 上,用 iOA DeepSeek V4.1 Flash 连真实 Runner 验证了冷构建进度和中途停止。刷新对话仍能看到正在执行的步骤,停止后约 0.4 秒观测到 Docker CLI 退出。前端 464 项测试、Go 工作区相关回归和 GitHub validate、e2e、platform 均通过。多阶段进度有一处可复现的问题,详见行内评论。

if step[3] == "FROM" {
return "准备基础镜像"
}
return fmt.Sprintf("执行 Dockerfile 第 %s/%s 步", step[1], step[2])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 保留多阶段 Dockerfile 的阶段标识

实测 BuildKit 的串行阶段先输出 #5 [compile 2/2] RUN …,再输出 #6 [package 2/2] RUN …。两条日志都映射成 执行 Dockerfile 第 2/2 步。用 PR 的解析器重放真实日志时,ensureDockerImage 的文本去重条件会丢掉 package 的进度事件。夹具进入 package 后又运行约 22 秒,对话里的步骤不会更新。建议把阶段名或稳定的阶段编号带进显示标签和去重键,继续省略指令参数。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants